import React, {useState} from 'react';
import * as allStore from './stores';
import { Child, Child2, Count } from './component/Child'
import { StoreProvider, HookRedux } from './HookRedux'

const hookRedux = new HookRedux(allStore);


export const UseReducer = () => {
    const {states, dispatch} = hookRedux.useRedux();

    return (
        <StoreProvider value={{states, dispatch}}>
            <Count />
            <Child />
            <Child2 />
        </StoreProvider>
    );
}
// https://zh-hans.reactjs.org/docs/hooks-reference.html#usereducer
